<template>
	<nav-header title="通知详情">
		<view class="p-4">
			<view class="text-black-33 font-bold text-lg" v-text="title"></view>
			<view class="my-2 text-gray-99" v-text="$util.getFormatDate(createTime)"></view>
			<u-parse :content="content"></u-parse>
		</view>
	</nav-header>
</template>

<script>
	import NavHeader from '@/components/nav_header.vue'
	import * as noticeApi from '@/interface/junchuang/notice.js'
	export default {
		components: {
			NavHeader
		},
		data() {
			return {
				id: '',
				title: '',
				content: '',
				createTime: ''
			}
		},
		onLoad(e) {
			if (e.id) this.id = e.id
		},
		onShow() {
      this.$util.openShare();
			const v = this
			noticeApi.getNoticeDetail(v.id).then(res=>{
				if (res.success) {
					let {title, content, createTime} = res.data
					v.title = title
					v.content = content
					v.createTime = createTime
				}
			})
			noticeApi.updateReadStatus(v.id)
		},
		methods: {
		}
	}
</script>

<style>

</style>
